From: Paul Eggert Date: Sun, 4 Sep 2011 17:25:23 +0000 (-0700) Subject: * print.c: Integer overflow fix. X-Git-Tag: archive/raspbian/1%29.2+1-2+rpi1~1^2~324^2~2391^2~4 X-Git-Url: https://dgit.raspbian.org/%22http:/www.example.com/cgi/%22https:/www.github.com/%22bookmarks:///%22http:/www.example.com/cgi/%22https:/www.github.com/%22bookmarks:/?a=commitdiff_plain;h=ff545d58cc2759a6cd8dc2589d19b5a9daeec035;p=emacs.git * print.c: Integer overflow fix. (print_object): Use ptrdiff_t, not int, for index that can exceed INT_MAX. --- diff --git a/src/ChangeLog b/src/ChangeLog index de916618583..dc72b7e3947 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,5 +1,9 @@ 2011-09-04 Paul Eggert + * print.c: Integer overflow fix. + (print_object): Use ptrdiff_t, not int, for index that can + exceed INT_MAX. + * indent.c: Integer overflow fixes. (position_indentation): Now takes ptrdiff_t, not int. (Fvertical_motion): Don't wrap around LINES values that don't fit diff --git a/src/print.c b/src/print.c index 35f89860843..913a14b3e42 100644 --- a/src/print.c +++ b/src/print.c @@ -1697,7 +1697,7 @@ print_object (Lisp_Object obj, register Lisp_Object printcharfun, int escapeflag } else if (BOOL_VECTOR_P (obj)) { - register int i; + ptrdiff_t i; register unsigned char c; struct gcpro gcpro1; EMACS_INT size_in_chars